<template>
    <div>
        <h1>AdminCheckUserInvest</h1>
        <table class="table table-bordered"> 
            <tr align="center">
                <td>投资人名称</td>
                <td>投资金额</td>
                <td>投资日期</td>
            </tr>
            <tr align="center" v-for="item in list">
                <td>{{ item.UserName }}</td>
                <td>{{ item.UI_Money }}</td>
                <td>{{ item.UI_Date}}</td>
            </tr>
        </table>
    </div>
</template>

<script setup lang="ts">
import{reactive,ref,toRefs,onMounted} from 'vue'
import { useRouter,useRoute } from 'vue-router'
import axios from 'axios'
let router=useRouter()
let route=useRoute()
let data:any=reactive({
    list:[]
})
let {list}=toRefs(data)
onMounted(()=>{
    getList();
})

const getList=()=>{
    axios({
        url:"/api/Invest/GetUsersInvest",
        method:"get",
        params:{
            id:route.query.id
        }
    })
    .then(res=>{
        console.log(res);
        list.value=res.data.data;
    })
    .catch(err=>{
        console.log(err);
    })
}
</script>

<style> 

</style>